<template>
    <div class="select_class">
        <div class="main" @click="m7_1()">
            <div class="left" >
                <div>意见反馈</div>
            </div>
            <div class="more"></div>
        </div>
        <div class="main">
            <div class="left">
                <div>关于我们</div>
            </div>
            <div class="more"></div>
        </div>
        <div class="main" @click="clearCache()">
            <div class="left">
                <div>清除缓存</div>
            </div>
            <div>{{cache.toFixed(2)}}M</div>
        </div>
        <!-- <div class="main" @click="updata()">
            <div class="left" >
                <div>检查更新</div>
            </div>
            <div class="more"></div>
        </div> -->
        <div class="row" style="padding:0.5rem;margin-top:0.6rem;">
            <mt-button style="width:100%;" @click="exit" type="danger">退出登录</mt-button>
        </div>
    </div>
</template>
<script>
    import {
        MessageBox
    } from 'mint-ui';
    export default {
        data() {
            return {
                cache: '',
            }
        },
        created() {
            this.cache = parseFloat(localStorage.getItem('cache')); //获取缓存大小

        },
        methods: {
            updata() { //检查更新
                this.$api.updata();
            },
            exit() {
                var params = JSON.parse(localStorage.getItem('useParams'));
                params.isExit = true;
                localStorage.setItem('useParams', JSON.stringify(params));
                this.$router.push({
                    path: 'login'
                })
            },
            m7_1() { //意见反馈
                this.$router.push({
                    'path': 'm7_1'
                })
            },
            clearCache() { //清除缓存
                MessageBox('提示', '清除缓存成功！');
                this.cache = 0;
                localStorage.setItem('cache', 0);
            },
        }
    }
</script>